package com.glorystone.ins.service;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.domain.AuditTask;
import com.glorystone.ins.enums.FlowBusinessTypeEnum;
import com.glorystone.ins.enums.FlowOperateTypeEnum;
import com.glorystone.ins.enums.RejectNodeEnum;
import com.glorystone.ins.enums.WorkFlowEnum;
import com.glorystone.ins.interceptor.PageList;

/**
 * Created by wangwei on 2018/3/8.
 */
public interface AuditTaskService {


    /**
     * 提价工作流
     * @param flow 工作流类型枚举
     * @param businessType 业务类型枚举
     * @param businessId 业务id
     * @param operate 操作类型枚举
     */
    void submit(WorkFlowEnum flow, FlowBusinessTypeEnum businessType, Long businessId, FlowOperateTypeEnum operate);

    void submit(WorkFlowEnum flow, FlowBusinessTypeEnum businessType, Long businessId, FlowOperateTypeEnum operate, RejectNodeEnum node);

    boolean isExists(AuditTask task);


    PageList<AuditTask> findList(PageVo vo);

    AuditTask findOne(AuditTask task);

    void updateViewToDone(Long id);
}
